import request from '@/utils/request'
import * as url from "url";

// 查询回收管理列表
export function listCollect(query) {
  return request({
    url: '/recovery/collect/list',
    method: 'get',
    params: query
  })
}

export function listCollectNumber(query) {
  return request({
    url: '/recovery/collect/list/number',
    method: 'get',
    params: query
  })
}

// 查询回收管理详细
export function getCollect(collectId) {
  return request({
    url: '/recovery/collect/' + collectId,
    method: 'get'
  })
}

// 新增回收管理
export function addCollect(data) {
  return request({
    url: '/recovery/collect',
    method: 'post',
    data: data
  })
}

// 修改回收管理
export function updateCollect(data) {
  return request({
    url: '/recovery/collect',
    method: 'put',
    data: data
  })
}

// 删除回收管理
export function delCollect(collectId) {
  return request({
    url: '/recovery/collect/' + collectId,
    method: 'delete'
  })
}

// 导出回收管理
export function exportCollect(query) {
  return request({
    url: '/recovery/collect/export',
    method: 'get',
    params: query
  })
}

// 回收商品生成
export function createGoodsList(data) {
  return request({
    url: '/recovery/collect/create/goods',
    method: 'post',
    data: data
  })
}
